package com.zhou.mango.service.impl;

import com.zhou.mango.dao.ShardingOrderDao;
import com.zhou.mango.entity.Order;
import com.zhou.mango.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Mr.zhou
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private ShardingOrderDao shardingOrderDao;
    @Override
    public void addOrder(Order order) {
        shardingOrderDao.addOrder(order);
    }

    @Override
    public List<Order> getOrdersByUid(Integer uid) {
        return shardingOrderDao.getOrdersByUid(uid);
    }
}
